package com.pp.proposalPrint.shared;

import java.util.logging.Level;
import java.util.logging.Logger;

// Class for describing the common parts of an object that is part of the proposal
// Superclass for Material for example
public abstract class ProposalContent {
	
	// static variable for storing the next available id
	private static int nextId = 0;
	
	private int id;
	private int no;
	private String name;
	//private float total;

	public ProposalContent(String name) {
		nextId++;
		this.id = nextId;
		this.no = nextId;
		this.name = name;
		Logger logger = Logger.getLogger("ProposalPrint");
		logger.log(Level.ALL, "[ProposalContent]: new content created: " + Integer.toString(this.id) + ", " + this.name);
	}

	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}

	// Must return the total sum of the object's cost
	// This might vary and be different in each implementation
	public abstract float getTotal();
	
	public int getId() {
		return this.id;
	}

	public int getNo() {
		return no;
	}

	public void setNo(int no) {
		this.no = no;
	}
}
